package com.woniu.custom.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName zy_company
 */
@TableName(value ="zy_company")
@Data
public class ZyCompany implements Serializable {
    /**
     * 集团/公司id
     */
    @TableId
    private String id;

    /**
     * 对应客户id（一个客户可以有多个集团
     */
    private String customId;

    /**
     * 集团编码
     */
    private String companyCode;

    /**
     * 集团客户名称
     */
    private String companyName;

    /**
     * 集团所属地市
     */
    private String companyAddr1;

    /**
     * 集团所属县市
     */
    private String companyAddr2;

    /**
     * 客户经理名称
     */
    private String companyManageName;

    /**
     * 客户经理电话
     */
    private String companyManagePhone;

    /**
     * 客户经理工号
     */
    private String companyManageCode;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZyCompany other = (ZyCompany) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCustomId() == null ? other.getCustomId() == null : this.getCustomId().equals(other.getCustomId()))
            && (this.getCompanyCode() == null ? other.getCompanyCode() == null : this.getCompanyCode().equals(other.getCompanyCode()))
            && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
            && (this.getCompanyAddr1() == null ? other.getCompanyAddr1() == null : this.getCompanyAddr1().equals(other.getCompanyAddr1()))
            && (this.getCompanyAddr2() == null ? other.getCompanyAddr2() == null : this.getCompanyAddr2().equals(other.getCompanyAddr2()))
            && (this.getCompanyManageName() == null ? other.getCompanyManageName() == null : this.getCompanyManageName().equals(other.getCompanyManageName()))
            && (this.getCompanyManagePhone() == null ? other.getCompanyManagePhone() == null : this.getCompanyManagePhone().equals(other.getCompanyManagePhone()))
            && (this.getCompanyManageCode() == null ? other.getCompanyManageCode() == null : this.getCompanyManageCode().equals(other.getCompanyManageCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCustomId() == null) ? 0 : getCustomId().hashCode());
        result = prime * result + ((getCompanyCode() == null) ? 0 : getCompanyCode().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getCompanyAddr1() == null) ? 0 : getCompanyAddr1().hashCode());
        result = prime * result + ((getCompanyAddr2() == null) ? 0 : getCompanyAddr2().hashCode());
        result = prime * result + ((getCompanyManageName() == null) ? 0 : getCompanyManageName().hashCode());
        result = prime * result + ((getCompanyManagePhone() == null) ? 0 : getCompanyManagePhone().hashCode());
        result = prime * result + ((getCompanyManageCode() == null) ? 0 : getCompanyManageCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", customId=").append(customId);
        sb.append(", companyCode=").append(companyCode);
        sb.append(", companyName=").append(companyName);
        sb.append(", companyAddr1=").append(companyAddr1);
        sb.append(", companyAddr2=").append(companyAddr2);
        sb.append(", companyManageName=").append(companyManageName);
        sb.append(", companyManagePhone=").append(companyManagePhone);
        sb.append(", companyManageCode=").append(companyManageCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}